package yws01.Business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yws01.DAO.ChezhuDAO;
import yws01.Model.Chezhu;

import java.util.List;

@Service
public class SaleServiceChezhu {

    ChezhuDAO chezhuDAO;
    @Autowired
    public void setChezhuDAO(ChezhuDAO chezhuDAO) { this.chezhuDAO = chezhuDAO; }
    @Transactional
    public void Chezhuinsert(Chezhu chezhu){chezhuDAO.insertChezhu(chezhu);}
    public void Chezhudelete(Chezhu chezhu){chezhuDAO.deleteChezhu(chezhu);}
    public Chezhu Chezhuquery(Chezhu chezhu){System.out.println(chezhuDAO.queryChezhu(chezhu));return chezhuDAO.queryChezhu(chezhu);}
    public void Chezhumodify(Chezhu chezhu){chezhuDAO.modifyChezhu(chezhu);}
    public void Chezhushengji(Chezhu chezhu){chezhuDAO.Chezhushengji(chezhu);}
    public List<Chezhu> Chezhuqueryvip(){return chezhuDAO.queryChezhuvip();}
}
